/*
 * BAConst.java
 * classes : com.qim.basdk.utilites.BAConst
 * @author xuwei
 * V 1.0.0
 * Created at 2015年8月20日 下午2:09:50
 */
package com.langsheng.lsintell.utils;

/**
 * com.qim.basdk.utilites.LSConst
 * <p>
 * 所有数据常量都在这里管理
 *
 * @author xuwei
 *         <p>
 *         created at 2015年8月20日 下午2:09:50
 */
public class LSConst {
    public final static String TAG = "LSConst";

    public final static String PSW_KEY = "L1649ed8967112315e414A0f946fd2fS";

    public final static String USER_ACE_GUEST = "0"; //访客
    public final static String USER_ACE_NONE = "1"; //普通用户
    public final static String USER_ACE_AGENT = "2"; //经销商
    public final static String USER_ACE_VIP = "3"; //VIP用户
    public final static String USER_ACE_ADMIN = "4"; //管理员
    public final static String USER_ACE_FIANCEADMIN = "5"; //财务管理员
    public final static String USER_ACE_SUPERADMIN = "6"; //超级管理员

    /**
     * 客户端平台信息
     */
    public final static String PLATFORM_WINDOWS = "0";
    public final static String PLATFORM_ANDROID = "1";
    public final static String PLATFORM_IOS = "2";

    //密码等数据加密类型
    public final static int PWD_TYPE_TOKEN = -1;// Token
    public final static int PWD_TYPE_NONE = 0; // 明码
    public final static int PWD_TYPE_MD5 = 1; // MD5加密,不可逆
    public final static int PWD_TYPE_ATEN = 2;// ATEN:aes256+base64
    public final static int PWD_TYPE_SHA256 = 3;// SHA256加密

    /*
     * 数据长度,单位字节
     */
    public final static int LENGTH_BYTE = 1;
    public final static int LENGTH_SHORT = 2;
    public final static int LENGTH_INT = 4;

    /*
     * socket连接状态
     */
    public final static int SOCKET_UNCONNECTED = 0;
    public final static int SOCKET_CONNECTED = 1;
    public final static int SOCKET_CONNECTING = 2;

    /*
     * 数据包头 信息
     */
    public final static int CMD_HEAD_LENGTH = 0x10; // 数据包头长度 16字节
    public final static int CMD_HEAD_PROVER = 0x01; // 协议版本

    // 本项目中可能用到的字符串编码格式
    public final static String CHARSET_UTF8 = "UTF8";
    public final static String CHARSET_GB2312 = "GB2312";
    public final static String CHARSET_GBK = "GBK";

    /*
     * 指令协议解析打包中分割符
     *
     * 行分割符为字符'\n'
     *
     * 参数分割符为空格" "
     *
     * 属性分割符为"="";"
     */
    public final static char CMD_SPLIT_LINE = '\n';
    public final static String CMD_SPLIT_LINE_EX = "\n";
    public final static String CMD_SPLIT_PARAM = " ";
    public final static String CMD_SPLIT_PROP = ":";
    public final static String CMD_PROP_CONTENT_LENGTH = "content-length";

}
